<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <!-- v-text 指令 渲染文本 -->
        <h1 v-text="msg"></h1>
        <!-- v-on:事件类型="处理函数" -->
        <!-- 1. 通过v-on 添加指定事件 -->
        <!-- 1.1 v-on 简写 @click="handleClick" -->
        <!-- <button v-on:click="handleClick">点击啊</button> -->
        <button @click="handleClick">点击啊</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                msg:"上课啦！！！"
            },
            /* 2. 添加handleClick处理函数 */
            methods: {
                handleClick:function(){
                    console.log("点击啦");
                }
            },
        })
    </script>
</body>
</html>